<include file="./Tpl/Home/Header.html"/>
<style type="text/css">
.buttonGreen2 {
background: none repeat scroll 0 0 #068814;
color: white;
display: inline-block;
font-size: 14px;
font-weight: 700;
height: 32px;
line-height: 32px;
margin-top: 5px;
margin-bottom: 5px;
text-align: center;
width: 100px;
}
</style>
<div class="marketArea clear">
	<include file="./Tpl/Home/Left.html"/>
	<div class="rightArea">
		<div class="buysellTitle">
              	<div class="selecttab1">
				<ul class="selecttab-box1">
					<li class="">
						<a href="{$path}/Kuang" class="otherBoxTitle">认购工厂</a>
					</li>
					<li class="">
						<a href="{$path}/Buy/all" class="otherBoxTitle">{$sys.kgname}列表</a>
					</li>
					<li class="cur">
						<a href="{$path}/Kuang/company" class="otherBoxTitle">组建公司</a>
					</li>
				</ul>
				<input type="hidden" value="0" id="playSymobl">
			</div>					
		</div>
	 
		<div class="rightArea3">
		<div class="riskArea">
			<span class="icon"></span>
			<span class="hinttext">
			<span class="define">公司简介</span>
			<span> {$sys.companyinfo|default='...'} 
			</span>
			</span>
		</div>
		</div>
			   
		     <div style="margin-top: 3px;" class="entrustTen lasttenorder">
			<div class="Tentitle">
		
 		     <span class="lightblue4" style="padding-bottom:20px;display:block;">组建公司区
			 <span>(您累计组建公司数：<font color="red">{$auth.companynum}</font>个)</span>
 		     </span>
			</div>
			 
	 </div>

		  <div style="margin-top: -30px;" class="entrustTen lasttenorder">
			<div class="Tentitle">
 		     <span class="lightblue4">组件公司</span>
			</div>
			  <div class="coinBoxBody">
					<table width="100%" style="background:#fff;">
						<tbody>
						 <tr>
						     <td style="padding:20px 0px;"><img src="/Public/Home/company.png" width="200"/></td>
							 <td style="padding:20px 0px;text-align:left;line-height:27px;width:450px;">
							     <h2>公司</h2>
								 <p>最多可建：{$sys.companylimit}个</p>
								 <p>已组建：{$auth.companynum}个</p>
								 <p>还可组建：{$curnum}个</p>
								 <p>组建数量：<input type="text" id="num"/> 个 <span id="numdes"></span></p>
								 <p><a class="buttonGreen2" id="btnA">组建</a></p>
							 </td>
						 </tr>
			            </tbody>
			        </table>
			</div>
		</div>
<script type="text/javascript" src="/Public/js/formcheck.js"></script>
<script language="javascript">
$(document).ready(function(){
    $('#num').blur(function(){
	    chkStr($('#num'),$('#numdes'),'请输入公司数量');
	});

    $('#num').focus(function(){
	    recover($('#num'),$('#numdes'));
	});

	$('#btnA').click(function(){
		var n = chkStr($('#num'),$('#numdes'),'请输入公司数量');
		if(n){
			$.post('{$path}/Kuang/zujian',{num:$('#num').val()},function(d){
				alert(d.info);
				if(d.status==0){
					location.reload();
				}
			},'json');
		}
	});
});
</script>

	<div style="margin-top: 3px;" class="entrustTen lasttenorder">
		<div class="Tentitle">

			<span class="lightblue4">公司列表</span>
		</div>
		<div class="coinBoxBody">
			<table width="100%">
				<tbody>
					<tr>
						<th width="120">创建时间</th>
						<th width="120">{$sys.kgname}个数</th>
						<th width="120">可获得{$sys.ksname}数</th>
					</tr>
					<volist name="list" id="vo" empty="$empty">
					<tr><td>{$vo.ctime|date="Y-m-d H:i:s",###}</td><td>{$vo.kg}</td><td>{$vo.ks}</td></tr>
					</volist>
				</tbody>
			</table>
		</div>
	</div>
	 
</div>
</div>
<include file="./Tpl/Home/Footer.html" />